<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="__CSS__/bootstrap.min.css" />
<link rel="stylesheet" href="__CSS__/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="__CSS__/matrix-style2.css" />
<link rel="stylesheet" href="__CSS__/matrix-media.css" />
<link href="__FONT__/css/font-awesome.css" rel="stylesheet" />
<link rel="stylesheet" href="__CSS__/changyun.css" />
<style>
.jd_table{border:1px solid #eee;margin-bottom:10px;}
.jd_table label{float:left;}
</style>
</head>
<body>
<div id="content" style="background:#ffffff;">

  <include file="Public/maintop" />
  <div style="margin-top:50px;padding:0 20px;">
	<form action="__ACTION__" method="POST" class="form-horizontal auth-form">
	<volist name="access_list" id="node" >
	<table width="100%" border="0" cellpadding="3"  class="jd_table">
	  <tr style="background:#eee;">
		<td height="20"><label class="checkbox"><input class="auth_rules rules_all" type="checkbox" name="rules[]" value="{#$node.id}" <php>if(in_array($node['id'],$rule_menu_check)) echo 'checked';</php>>{#$node.title}</label></td>
	  </tr>
	  <present name="node['cat']">
	  <volist name="node['cat']" id="child" >
	  <tr class="jd_twocat">
		<td bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
			<td height="22">
			<label class="checkbox">
                <input class="auth_rules rules_row" type="checkbox" name="rules[]" value="{#$child.id}" <php>if(in_array($child['id'],$rule_menu_check)) echo 'checked';</php>/>{#$child.title}
            </label>
			</td>
		  </tr>
		  <notempty name="child['two_cat']">
		  <tr class="jd_threecat">
			<td height="22">
				<volist name="child['two_cat']" id="op">
				   <label class="checkbox" style="margin-left:20px;">
					   <input class="auth_rules" type="checkbox" name="rules[]" value="{#$op.id}" <php>if(in_array($op['id'],$rule_menu_check)) echo 'checked';</php> />{#$op.title}
				   </label>
			   </volist>
			</td>
		  </tr>
		  </notempty>
		</table></td>
	  </tr>
	  </volist>
	  </present>
	</table>
	</volist>
			        <input type="hidden" name="id" value="{#$this_group.id}" />
                    <button type="submit" class="btn btn-success">确 定</button>
                    <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
			    </form>
				</div>
 
</div>
<script src="__JS__/jquery.min.js"></script> 
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/jquery.ui.custom.js"></script>
<script src="__JS__/jquery.uniform.js"></script>
<script src="__JS__/select2.min.js"></script> 
<script src="__JS__/matrix.js"></script>
<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__PUBLIC__/js/Validform.min.js"></script>
<script type="text/javascript">
$(function(){
	//$('input[type=checkbox],input[type=radio],input[type=file]').uniform();
	//$('select').select2();
	
	//全选节点
        $('.rules_all').on('change',function(){
            $(this).closest('.jd_table').find('.jd_twocat').find('input').prop('checked',this.checked);
        });
        $('.rules_row').on('change',function(){
            $(this).closest('.jd_twocat').find('.jd_threecat').find('input').prop('checked',this.checked);
        });

        $('select[name=group]').change(function(){
			location.href = this.value;
        });
})
</script>

</body>
</html>
